## Process this file with autoconf to produce a configure script.
## 
## $Id$

AC_PREREQ(2.61)
AC_INIT([iso9660],[1.0.0],[http://www.rtems.org/bugzilla])
AC_CONFIG_SRCDIR([iso9660.c])
RTEMS_PACKAGE_TOP([ISO9660], [1.0.0], [.])

RTEMS_CANONICAL_TARGET_CPU

AM_INIT_AUTOMAKE([no-define foreign dist-bzip2 no-dist-gzip 1.10])
AM_MAINTAINER_MODE

RTEMS_RTEMSPATH
RTEMS_ENABLE_RTEMS_DEBUG
RTEMS_ENABLE_RTEMSBSP

RTEMS_PROG_CC_FOR_TARGET([-fasm])
RTEMS_PROG_CCAS
RTEMS_CANONICALIZE_TOOLS
AM_PROG_CC_C_O
AC_PROG_RANLIB

AC_HEADER_STAT
AC_CHECK_HEADERS([errno.h netinet/in.h sys/stat.h sys/types.h unistd.h])
AC_DEFINE([HAVE_NETINET_IN_H], [1])

RTEMS_OBJECT_FORMAT
RTEMS_ENABLE_NETWORKING

AM_CONDITIONAL([PC586],   [test x"${RTEMS_BSP}" = x"pc586"])

AS_IF([test x"${RTEMS_BSP}" = x"pc586"], 
      [RTEMS_APP_IDEDISK=1],
      [RTEMS_APP_IDEDISK=0])
      
RTEMS_CPPFLAGS="${RTEMS_CPPFLAGS} -DRTEMS_APP_IDEDISK=${RTEMS_APP_IDEDISK}"
RTEMS_CPPFLAGS="${RTEMS_CPPFLAGS} -D${RTEMS_BSP}=1 -DRTEMS_API=${RTEMS_API}"


## Iconv configuration for Joliet extension
AC_ARG_WITH([iconv],
      AS_HELP_STRING([--without-iconv], 
          [Disable iconv support and multi-byte character in Joliet strings]))
  
AS_IF([test "x$with_iconv" != "xno"],
      AC_CHECK_FUNC([iconv_open], [enable_iconv=1], [enable_iconv=0]),
      [enable_iconv=0])
      
AM_CONDITIONAL([HAVE_ICONV],  [test "x${enable_iconv}" = "x1"])
RTEMS_CPPFLAGS="${RTEMS_CPPFLAGS} -DHAVE_ICONV=${enable_iconv}"
  
AC_CONFIG_FILES([
Makefile
])
AC_OUTPUT
